package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IMyOrderDetailsActivityModel;
import com.wgts.wgts.mvp.model.imp.MyOrderDetailsActivityModel;
import com.wgts.wgts.mvp.presenter.IMyOrderDetailsActivityPresenter;
import com.wgts.wgts.mvp.presenter.imp.MyOrderDetailsActivityPresenter;
import com.wgts.wgts.mvp.view.IMyOrderDetailsActivityView;
import com.wgts.wgts.netmodle.NetService;
import com.wgts.wgts.tools.CountDownTime;

import dagger.Module;
import dagger.Provides;

/*
 *
 *
 *   data:2018/10/914:31
 *
 */
@Module
public class MyOrderDetailsActivityModule {
    private IMyOrderDetailsActivityView view;

    public MyOrderDetailsActivityModule(IMyOrderDetailsActivityView view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    public IMyOrderDetailsActivityView provideView(){
        return view;
    }

    @ActivityScope
    @Provides
    public IMyOrderDetailsActivityModel provideModel(NetService netService, CountDownTime countDownTime){
        return new MyOrderDetailsActivityModel(netService, countDownTime);
    }

    @ActivityScope
    @Provides
    public IMyOrderDetailsActivityPresenter providePresenter(IMyOrderDetailsActivityView view, IMyOrderDetailsActivityModel model){
        return new MyOrderDetailsActivityPresenter(view, model);
    }
}
